////////////////////////////////////////////////////////////////////////////////////////
// Stauffer Public Perceptions of Women's Inclusion and Feelings of Political Efficacy
// Replication Code - Appendix 4
///////////////////////////////////////////////////////////////////////////////////////

***********
// TABLE A3
***********
*set working directory

use 1618_CCES.dta, clear

/// Dyadic Rep: Alt measure 1
*Base
xtmixed efficacy_1 c.r_estimate gender_r c.ideo7 i.party strong_partisan know_alt religiosity ///
coll white c.age##c.age employed woman_sen_alt1 gender_r woman_rep_alt1 gender_r c.stateleg gender_r ///
i.year || state:

estimates store base_alt1 

*Interactive 
xtmixed efficacy_1 c.r_estimate##gender_r c.ideo7 i.party strong_partisan know_alt religiosity ///
coll white c.age##c.age employed woman_sen_alt1##gender_r woman_rep_alt1##gender_r c.stateleg##gender_r ///
i.year || state:

estimates store int_alt1

/// Dyadic Rep: Alt measure 2
*Base
xtmixed efficacy_1 c.r_estimate gender_r c.ideo7 i.party strong_partisan know_alt religiosity ///
coll white c.age##c.age employed woman_sen_alt2 gender_r woman_rep_alt2 gender_r c.stateleg gender_r ///
i.year || state:

estimates store base_alt2

*Interactive 
xtmixed efficacy_1 c.r_estimate##gender_r c.ideo7 i.party strong_partisan know_alt religiosity ///
coll white c.age##c.age employed woman_sen_alt2##gender_r woman_rep_alt2##gender_r c.stateleg##gender_r ///
i.year || state:
estimates store int_alt2 


*Generate code for LaTex tables 
estout base_alt1 int_alt1 base_alt2 int_alt2, cells(b(star fmt(%9.3f)) se(par)) ///
style(tex) stats(N) nobaselevels interaction ("X") starlevels (* .1 ** .05 *** .01)
